package com.lwm.mybatis.custom.dao;

import com.lwm.mybatis.custom.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liweimin
 * @date 2021/6/15 15:17
 * @since
 */
public interface UserDAO {
    /**
     * 查询所有
     *
     * @return
     */
    List<User> findAll();

    /**
     * 通过id查询用户
     *
     * @param id
     * @return
     */
    @Select("select * from user where id = #{id}")
    User findUserById(@Param("id") Integer id);
}
